]>
Commit | Line | Data |
---|---|---|
56968557 P |
1 | # TP1 10.29 Two Masses fixed to walls |
2 | # Two equal masses m are connected to each other by a spring (spring constant D) and on either side to a fixed wall. | |
3 | ||
4 | # m*s1'' + 2D*s1 - D*s2 = 0 => s1'' = -D/m*s1 -D/m*s1 + D/m*s2 | |
5 | # m*s2'' + 2D*s1 - D*s1 = 0 => s2'' = -D/m*s2 -D/m*s2 + D/m*s1 | |
6 | ||
7 | coefficient(1): D/m_1 # D/m for s1 | |
8 | coefficient(2): D/m_2 # D/m for s2, identical to D/m_1 | |
9 | coefficient(3): -1 -> -s1_0 # initial position of s1 | |
10 | coefficient(4): -1 -> -s2_0 # initial position of s2 | |
11 | ||
12 | iintegrate -D/m*s1, -D/m*s1, D/m*s2 -> -s1' # input is s1'' | |
13 | iintegrate -s1' -> s1 | |
14 | IC: -s1_0 | |
15 | s1 * D/m_1 -> D/m*s1 | |
16 | invert D/m*s1 -> -D/m*s1 | |
17 | ||
18 | iintegrate -D/m*s2, -D/m*s2, D/m*s1 -> -s2' # input is s2'' | |
19 | iintegrate -s2' -> s2 | |
20 | IC: -s2_0 | |
21 | s2 * D/m_2 -> D/m*s2 | |
22 | invert D/m*s2 -> -D/m*s2 | |
23 | ||
24 | output(x): s1 | |
25 | output(y): s2 |